CPPSRC=$(shell ls *.cpp)
CSRC=$(shell ls *.c)
CPPOBJ=$(patsubst %.cpp,%.o,$(CPPSRC))
COBJ=$(patsubst %.c,%.o,$(CSRC))
CC=gcc
CFLAGS=-Wall -g
CXX=g++
CXXFLAGS=-Wall -g

all:noserverbbs

noserverbbs:$(CPPOBJ) $(COBJ)
	$(CXX) $(CXXFLAGS) -o $@ $^ -lpthread

$(CPPOBJ):%.o:%.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<

$(COBJ):%.o:%.c
	$(CC) $(CFLAGS) -o $@ -c $<

clean:
	rm -f *.o noserverbbs

